home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
PIL
/
XVThumbImagePlugin.pyo
(
.txt
)
< prev
Wrap
Python Compiled Bytecode
|
2008-10-13
|
1KB
|
43 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
__version__ = '0.1'
import string
import Image
import ImageFile
import ImagePalette
PALETTE = ''
for r in range(8):
for g in range(8):
for b in range(4):
PALETTE = PALETTE + chr(r * 255 / 7) + chr(g * 255 / 7) + chr(b * 255 / 3)
class XVThumbImageFile(ImageFile.ImageFile):
format = 'XVThumb'
format_description = 'XV thumbnail image'
def _open(self):
s = self.fp.read(6)
if s != 'P7 332':
raise SyntaxError, 'not an XV thumbnail file'
while None:
s = string.strip(self.fp.readline())
if s == '#END_OF_COMMENTS':
break
continue
continue
s = string.split(self.fp.readline())
self.mode = 'P'
self.size = (int(s[0]), int(s[1]))
self.palette = ImagePalette.raw('RGB', PALETTE)
self.tile = [
('raw', (0, 0) + self.size, self.fp.tell(), (self.mode, 0, 1))]
return None
Image.register_open('XVThumb', XVThumbImageFile)